<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Vue-</title>

</head>
<body>
<div id="app">
    <input type="text" v-model="msg">
    <span>{{msg}}</span>
    <hr>
    <input type="button" value="双向绑定" v-on:click="asd">
</div>
<!--在head或body标签内部，可以通过script标签引入外部的JS文件,这里引入vue.js-->
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script>
    const app = new Vue({
        el: "#app",
        data: {
            msg: "",
        },
        methods: {
            asd() {
                this.msg = "我是亿万富翁";
            }
        }
    })
</script>
</body>
</html>